#ifndef PAGE_HPP
#define PAGE_HPP

#include "SDL.h"
#include "AppState.hpp"

class Page {
    friend class PageManager;

    public:
        Page();
        virtual ~Page();
        // 由 PageManager 调用
        virtual void init()=0;
        virtual void handle(const SDL_Event& event)=0;
        virtual void update()=0;
        virtual void draw(const SDL_Rect& canvas)=0;
    protected:
        AppState* app_state;
        bool has_focus;
        zj_string page_name;
};

#endif
